package com.hnhcyy.goods.api;

import java.util.HashMap;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hnhcyy.b2b.common.model.EshopResult;
import com.hnhcyy.goods.service.SearchService;

public class SearchApi {

	@Autowired 
	private SearchService searchService;

	//查询可销的商品ID列表，用逗号隔开
	@RequestMapping("/getSpids")
	public EshopResult getSpids(int sjid,int qyid,String dwbh) {
		String spids = searchService.getSpids(sjid, qyid, dwbh);
		return new EshopResult(spids);
	}

	@RequestMapping("/get")
	public HashMap get(int sjid,String spid) {
		return searchService.get(sjid,spid);
	}

	@RequestMapping("/set")
	public HashMap set(int sjid,String spid) {
		return searchService.get(sjid,spid);
	}

	@RequestMapping("/del")
	public HashMap del(int sjid,String spid) {
		return searchService.get(sjid,spid);
	}

}
